﻿using System;
using Domain.Model.Commons.Atrributes;
namespace Domain.Model.Commons
{
    public abstract class AbstractDictEntity : IDomainIdentifer<string> , IComparable<AbstractDictEntity>
    {
        [PrimaryKey("id", Generator = IdGenerators.Assigned)]
        public virtual string Id { get; set; }

        [Property("name")]
        public virtual string Name { get; set; }

        /// <summary>
        /// 优先级：0为禁用
        /// </summary>
        [Property("Priority")]
        public virtual int Priority { get; set; }

        public int CompareTo(AbstractDictEntity other)
        {
            return this.Priority.CompareTo(other.Priority);
        }
    }
}
